import Request from '../utils/http.js';

export default {
	//获取商品详情
	getShopDetail: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/shop_detail',
			method: 'POST',
			params: params
		});
	},
	
	//获取服务商详情
	getServiceDetail: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/getInfo',
			method: 'POST',
			params: params
		});
	},
	
	//添加收藏
	addCollect: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/setCollect',
			method: 'POST',
			params: params
		});
	},
	
	//购买商品
	buyShop: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/user_buyshop',
			method: 'POST',
			params: params
		});
	},
	
	//订单详情
	orderDetail: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/getuserorderdetail',
			method: 'POST',
			params: params
		});
	},
	
	//支付商品价格
	payShop: function(params) {
		return Request.httpTokenRequest({
			url: '/api/service/applet_getUserOrderPayData',
			method: 'POST',
			params: params
		});
	}
}